package com.gopay.gass.service.impl.bank;

import org.springframework.stereotype.Service;

import com.gopay.common.domain.bank.BcdlMessage;
import com.gopay.gass.constants.SameBank;
import com.gopay.gass.domain.GassMainOrder;
import com.gopay.gass.domain.GassOrderDtl;
import com.gopay.gass.service.impl.GassPayRequestServiceImpl;

/**
 * 中行银企直连
 * @author lianpeng
 *
 */
@Service("ccbGassPayRequestService")
public class CCBGassPayRequestServiceImpl extends GassPayRequestServiceImpl {

	protected SameBank getSameBank(String recvBankName){
        if(recvBankName.indexOf("建行") !=-1 || recvBankName.indexOf("建设银行")!=-1){
        	// 排除中国农业发展银行
            return SameBank.NO;
        }
        return SameBank.YES;
    }

	@Override
	protected BcdlMessage buildBcdlMessage(GassMainOrder main, GassOrderDtl dtl) {
		// TODO Auto-generated method stub
		BcdlMessage message = super.createBaseBcdlMessage(main, dtl);
        message.setPbocBankName(getBankName());
        message.setPobcBankCode("105");
        return message;
	}

	@Override
	protected String getBankName() {
		// TODO Auto-generated method stub
		return "建设银行";
	}

}